import React from 'react'
class StoppPlay extends React.Component{
    state = {
        num:21
    }
    render(){
        if(this.state.num===20){
            return(
                <fieldset>
                    <legend>阻止组件展示</legend>
                    <h1>组件好在那时列</h1>
                </fieldset>
            )
        }else{ //阻止组件的渲染
            return null
        }
    }
}
export default StoppPlay